$(document).ready(function() {
	$('#comanda').dataTable({
    	"sAjaxSource": "usuarios/ler",
    	"aoColumns": [
    		{ "mData": "login_usuario" },
    		{ "mData": "email_usuario" },
    		{ "mData": "grupo_usuario" },
    		{ "mData": "id_usuario", "mRender": function ( data, type, full ) { return '<a href="usuarios#form_usuario" class="fancybox"><i class="icon-edit"/></a>' }, "sClass": "center" },
    		{ "mData": "id_usuario", "mRender": function ( data, type, full ) { return '<a href="usuarios/deletar/'+data+'"><i class="icon-trash"/></a>' }, "sClass": "center" },
		
		],
		"aoColumnDefs": [
		    { "sWidth": "1%", "aTargets": [ 3, 4 ] }
		],
     	"aaSorting": [[ 3, "asc" ]],
    	"sPaginationType": "full_numbers"
	});
	
	$(".fancybox").fancybox({
		maxWidth	: 380,
		maxHeight	: 390,
		autoSize	: false,
	});
});